53e95788f7ebcd8efbffc633e177105fa0cfdadc,components/camel-mybatis/src/main/java/org/apache/camel/component/mybatis/MyBatisProducer.java,MyBatisProducer,doProcessResult,#Exchange#Object#,227

Before Change


                answer.getHeaders().putAll(exchange.getIn().getHeaders());
            }
            // set the result as body for insert
            answer.setBody(result);

            answer.setHeader(MyBatisConstants.MYBATIS_RESULT, result);
            answer.setHeader(MyBatisConstants.MYBATIS_STATEMENT_NAME, statement);

After Change


            }

            // we should not set the body if its a stored procedure as the result is already in its OUT parameter
            MappedStatement ms = session.getConfiguration().getMappedStatement(statement);
            if (ms != null && ms.getStatementType() == org.apache.ibatis.mapping.StatementType.CALLABLE) {
                if (result == null) {
                    LOG.trace("Setting result as existing body as MyBatis statement type is Callable, and there was no result.");
                    answer.setBody(exchange.getIn().getBody());
                } else {
                    // set the result as body for insert
                    LOG.trace("Setting result as body: {}", result);
                    answer.setBody(result);
                }
            } else {
                // set the result as body for insert